/*
 * @Author: zhangyang
 * @Date: 2022-03-09 15:25:46
 * @LastEditTime: 2022-03-09 15:28:26
 * @Description: 系统消息
 */
import type { MsgItem } from '@/layouts/components/Msg';
import { Icons } from '@/typings/icons';
import { defineStore, acceptHMRUpdate } from 'pinia';

export const useMsgStore = defineStore('useMsgStore', () => {
  const msgList = reactive<MsgItem[]>([
    { icon: () => h(Icons.BiDisplay), msg: '我是通知内容我是通知内容我是通知内容', time: '2022-03-09', cbk: () => window.$message.info('点击了消息') },
    { icon: () => h(Icons.BiSliders), msg: '我是通知内容', time: '2022-03-09' },
    { icon: () => h(Icons.BiTable), msg: '我是通知内容', time: '2022-03-09' },
    { icon: () => h(Icons.CarbonLoadBalancerListener), msg: '我是通知内容', time: '2022-03-09' },
    { icon: () => h(Icons.IcBaselineCloudUpload), msg: '我是通知内容', time: '2022-03-09' },
    { icon: () => h(Icons.UiwAppstoreO), msg: '我是通知内容', time: '2022-03-09' },
    { icon: () => h(Icons.RiAdminLine), msg: '我是通知内容', time: '2022-03-09' }
  ]);
  return {
    msgList
  };
});

import.meta.hot && import.meta.hot.accept(acceptHMRUpdate(useMsgStore, import.meta.hot));